package io.jnet.common.channelcontext;

import java.nio.channels.AsynchronousSocketChannel;
import java.util.concurrent.ExecutorService;
import io.jnet.common.api.AioListener;
import io.jnet.common.api.ChannelContext;
import io.jnet.common.api.ReadProcessor;
import io.jnet.common.api.WriteHandler;
import io.jnet.common.bufstorage.BufStorage;
import io.jnet.common.decodec.FrameDecodec;
import io.jnet.common.readprocessor.ThreadAttachReadProcessor;
import io.jnet.common.streamprocessor.StreamProcessor;

public class ThreadAttachChannelContext extends BaseChannelContext
{
    
    public ThreadAttachChannelContext(ExecutorService businessExecutorService, //
            BufStorage bufStorage, //
            int maxMerge, //
            AioListener aioListener, //
            StreamProcessor[] inProcessors, //
            StreamProcessor[] outProcessors, //
            AsynchronousSocketChannel socketChannel, //
            FrameDecodec frameDecodec)
    {
        super(businessExecutorService, bufStorage, maxMerge, aioListener, inProcessors, outProcessors, socketChannel, frameDecodec);
    }
    
    @Override
    protected ReadProcessor buildReadProcessor(ExecutorService businessExecutorService, AioListener serverListener, ChannelContext channelContext, BufStorage bufStorage, WriteHandler writeHandler, StreamProcessor[] inProcessors)
    {
        return new ThreadAttachReadProcessor(businessExecutorService, serverListener);
    }
    
}
